package cn.factorybox.item.service.impl;

import cn.factorybox.common.utils.UUIDUtil;
import cn.factorybox.item.mapper.FeedBackMapper;
import cn.factorybox.item.service.FeedBackService;
import cn.factorybox.model.entity.FeedBack;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author flypig
 * @version 1.0
 * @date 2020-11-23 13:57
 */
@Service
public class FeedBackServiceImpl implements FeedBackService {

    @Autowired
    private FeedBackMapper feedBackMapper;

    @Override
    public int insertFeedBack(FeedBack feedBack) {
        feedBack.setId(UUIDUtil.uuid());
        feedBack.setfCreateTime(new Date());
        return feedBackMapper.insertFeedBack(feedBack);
    }

    @Override
    public List<FeedBack> selectList(String masterId) {
        return feedBackMapper.selectList(masterId);
    }

    @Override
    public int delete(String id) {
        return feedBackMapper.deleteById(id);
    }


}
